package com.yyy.serviceImpl;

import com.yyy.dao.Tb_DoorMapper;
import com.yyy.pojo.tb_door;
import com.yyy.service.Tb_DoorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class Tb_DoorServiceImpl implements Tb_DoorService {
    @Autowired
    Tb_DoorMapper tb_doorMapper;

    @Override
    public List<tb_door> findAll() {
        return tb_doorMapper.findAll();
    }
    //新增一条门店记录
    @Override
    public int  insertOne(tb_door td) {
        int j = tb_doorMapper.insertOne(td);
        return j;
    }

    @Override
    public int updateById(tb_door td) {
        int i = tb_doorMapper.updateById(td);
        return i;
    }

    @Override
    public tb_door selectById(Integer id) {
        tb_door tb_door = tb_doorMapper.selectById(id);
        return tb_door;
    }

    @Override
    public int deleteById(Integer id) {
        int i=tb_doorMapper.deleteById(id);
        return i;
    }
}
